import INode from './INode';

abstract class File implements INode{
  name:string;
  abstract fileType: string;
  constructor(fileName:string){
    this.name = fileName;
  }
  abstract killVirus():void;
}

class ImageFile extends File{
  fileType:string = 'image';
  killVirus():void{
    console.log(`正在查杀图像文件：${this.name}，文件类型：${this.fileType}`);
  }
}

class VideoFile extends File{
  fileType:string = 'mp4';
  killVirus():void{
    console.log(`正在查杀视频文件：${this.name}，文件类型：${this.fileType}`);
  }
}

class TextFile extends File{
  fileType:string = 'txt';
  killVirus():void{
    console.log(`正在查杀文本文件：${this.name}，文件类型：${this.fileType}`);
  }
}

export {ImageFile, VideoFile, TextFile};